/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-03-01
 * Time: 15:23
 */
public class Animal {
    public String name;
    public int age;
    public String color;

    static{
        System.out.println("Animal：static");
    }

    {
        System.out.println("Animal:实例化");
    }


    public Animal(String name, int age, String color) {
        this.name = name;
        this.age = age;
        this.color = color;
        System.out.println("anmial构造");
    }

    public void eat() {
        System.out.println(this.name + "吃饭");
    }
}
